package App.Job;

import App.Model.ConnectinManager;
import App.Model.ConnectionInfo;
import App.Model.Task.TaskJobInfo;
import App.Repository.JobRepository;
import App.Repository.TaskAuthRepository;
import org.quartz.Job;
import org.quartz.JobDetail;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;

import java.io.Serializable;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * Created by xw on 2019/4/22.
 */
public class AuthJob implements Job, Serializable {

    @Override
    public void execute(JobExecutionContext context) throws JobExecutionException {

        try {
            ConnectionInfo _conn = ConnectinManager.getConnectionInfo();
            TaskAuthRepository _taskRepository=new TaskAuthRepository();
            _taskRepository.passUserAuth(_conn.getUrl(),_conn.getUsername(),_conn.getPassword());

        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }
}
